package com.sangmo.boot.framework.plugin.dataview.crud.service;

import com.sangmo.boot.framework.data.entity.Entity;
import com.sangmo.boot.framework.data.filter.Criteria;
import com.sangmo.boot.framework.data.filter.PageResult;
import com.sangmo.boot.framework.data.filter.PageSearch;
import com.sangmo.boot.framework.data.repo.IRepo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public abstract class JpaViewService<T extends Entity> extends BaseViewService<T> {

    public PageResult<T> search(PageSearch ps, Criteria.CriteriaModifier... modifiers) {
        return ((IRepo)getRepo()).search(ps, modifiers);
    }

}
